Skip to content

Improve publication logging#1503

Open
jazairi wants to merge 1 commit intomainfrom
better-logging
Open

Improve publication logging#1503
jazairi wants to merge 1 commit intomainfrom
better-logging

Conversation

@jazairi
Copy link
Contributor

@jazairi jazairi commented Mar 26, 2026

Why these changes are being introduced:

Our current logging doesn't capture much
information. (It usually just says 'N/A'.) While
DSpace errors are not useful, we should still
probably try to capture what's there.

Relevant ticket(s):

N/A

How this addresses that need:

That adds some Copilot-suggested changes to
enhance our logging in the DSpace publication
results job.

Side effects of this change:

None.

Developer

  • All new ENV is documented in README
  • All new ENV has been added to Heroku Pipeline, Staging and Prod
  • ANDI or Wave has been run in accordance to
    our guide and
    all issues introduced by these changes have been resolved or opened as new
    issues (link to those issues in the Pull Request details above)
  • Stakeholder approval has been confirmed (or is not needed)

Code Reviewer

  • The commit message is clear and follows our guidelines
    (not just this pull request message)
  • There are appropriate tests covering any new functionality
  • The documentation has been updated or is unnecessary
  • The changes have been verified
  • New dependencies are appropriate or there were no changes

Requires database migrations?

NO

Includes new or updated dependencies?

NO

@coveralls
Copy link

coveralls commented Mar 26, 2026

Coverage Status

coverage: 98.232% (-0.1%) from 98.35%
when pulling 2bc00ae on better-logging
into 664187c on main.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Enhances DSpace publication results logging by extracting more detail from DSS error payloads so errors are less frequently “N/A” and more actionable.

Changes:

  • Replace single-field DSS error logging with a formatted, multi-field error summary (ErrorInfo/DSpaceResponse/ExceptionMessage/ExceptionTraceback).
  • Add traceback formatting to keep stack traces readable (first few non-blank lines).
  • Extend the job test to assert that DSS error payload details appear in the returned results[:errors].

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
app/jobs/dspace_publication_results_job.rb Adds format_dss_error + format_traceback and uses them when ResultType == 'error' to improve logged/error-report detail.
test/jobs/dspace_publication_results_job_test.rb Adds an assertion ensuring ErrorInfo details are surfaced in the collected errors.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Why these changes are being introduced:

Our current logging doesn't capture much
information. (It usually just says 'N/A'.) While
DSpace errors are not useful, we should still
probably try to capture what's there.

Relevant ticket(s):

N/A

How this addresses that need:

That adds some Copilot-suggested changes to
enhance our logging in the DSpace publication
results job.

Side effects of this change:

None.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants